<{include file="public/header.html"}>
<script type="text/javascript">is_load_face=true;</script>
		<header class="bj-white title-border-sm search-page follow-head">
			<a href="javascript:;" class="icon-return iconfont iconfont-top iconfont-left" onclick="javascript:history.back(-1);">&#xe604;</a>
			<h1 class="bar-title">我的文章</h1>
		</header>
		<section class="index-wraper mt50">
	        <div class="recommend-article my-article" id="content-list">

	        </div>
	        <!--上拉加载-->
			<div class="loading" id="noresults" style="display: none;">
				<a href="javascript:;" class="load-success empty-load">
					<img src="<{$style_dir}>/img/none/2.jpg">
					<p class="col-greyccc">是时候发挥你的文采了</p>
					<p class="col-greyccc">电脑登录“www.tan66.com”去发表文章哦…</p>
				</a>
			</div>
			<div class="loading" id="loading" style="display: none;">
				<a class="/*pull-load*/ load-success" href="javascript:;">加载中...</a>
			</div>
			<div class="loading" id="nomoreresults" style="display: none;">
				<a href="javascript:;" class="load-success nomore-load">已经到底啦~~~</a>
			</div>
    	</section>
		<script type="text/javascript" src="/static/js/emotions.js"></script>
		<script type="text/javascript" src="/static/js/scrollpagination.js"></script>
		<script type="text/javascript" src="/static/js/account-min-1.0.js"></script>
		<script type="text/javascript">
			$(function(){
				var currentPage = 0;
				$('#content-list').scrollPagination({
					'contentPage': "/ajax/get_arts_json",
					'contentData': {
						'pageIndex': currentPage,
						'uuid': is_login.uuid
					},
					'scrollTarget': $(window),
					'heightOffset': 0,
					'beforeLoad': function() { // before load function, you can display a preloader div
						$('#loading').fadeIn('fast');
						$('#loading').attr('scrollpagination','disabled');
					},
					'afterLoad': function(elementsLoaded) { // after loading content, you can use this function to animate your new elements
						$('#loading').fadeOut('fast');
						$('#loading').attr('scrollpagination','enabled');
						if (elementsLoaded.length == 0) {
							if(currentPage != 0){
								$('#nomoreresults').fadeIn('slow');
							}
							$('#content-list').stopScrollPagination();
						}else{
							currentPage = currentPage + 1;
						}
						if(elementsLoaded.length == 0 && currentPage == 0){
							$("#noresults").fadeIn('slow');
						}else{
							for(var i=0;i<elementsLoaded.length;i++){
								var str = AnalyticEmotion(elementsLoaded[i].innerHTML);
								elementsLoaded[i].innerHTML = str;
							}
							this.contentData.pageIndex = currentPage;
							$(elementsLoaded).fadeInWithDelay();
						}

						if ($('#content-list').children().length > 100) { // if more than 100 results already loaded, then stop pagination (only for testing)
							$('#nomoreresults').fadeIn();
							$('#content-list').stopScrollPagination();
						};
					}
				});
				$.fn.fadeInWithDelay = function() {
					var delay = 0;
					return this.each(function() {
						$(this).delay(delay).animate({
							opacity: 1
						}, 200);
						delay += 100;
					});
				};
			});
		</script>
	</body>
</html>
